%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for queries/relay/defaultNodeIdCodec.conditionNodeId"
    Bucket0("Bucket 0 (root)<br /><br />1: 113, 117, 121, 125<br />ᐳ: 6, 8, 12, 13, 19, 28, 36, 100, 7, 14, 16, 18, 25, 27, 33, 35, 42<br />2: 11, 22, 30, 39<br />ᐳ: 114, 118, 122, 126<br />3: 15, 24, 32, 41<br />4: 44, 47, 50, 53"):::bucket
    Bucket1("Bucket 1 (nullableBoundary)<br />Deps: 15, 44, 114, 100<br /><br />ROOT Connectionᐸ11ᐳ[15]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 24, 47, 118, 100<br /><br />ROOT Connectionᐸ22ᐳ[24]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 32, 50, 126, 100<br /><br />ROOT Connectionᐸ30ᐳ[32]"):::bucket
    Bucket4("Bucket 4 (nullableBoundary)<br />Deps: 41, 53, 122, 100<br /><br />ROOT Connectionᐸ39ᐳ[41]"):::bucket
    Bucket9("Bucket 9 (listItem)<br />Deps: 114, 100<br /><br />ROOT __Item{9}ᐸ44ᐳ[56]"):::bucket
    Bucket10("Bucket 10 (listItem)<br />Deps: 118, 100<br /><br />ROOT __Item{10}ᐸ47ᐳ[58]"):::bucket
    Bucket11("Bucket 11 (listItem)<br />Deps: 126, 100<br /><br />ROOT __Item{11}ᐸ50ᐳ[60]"):::bucket
    Bucket12("Bucket 12 (listItem)<br />Deps: 122, 100<br /><br />ROOT __Item{12}ᐸ53ᐳ[62]"):::bucket
    Bucket13("Bucket 13 (nullableBoundary)<br />Deps: 57, 114, 100<br /><br />ROOT PgSelectSingle{9}ᐸpostᐳ[57]<br />1: <br />ᐳ: 96, 115, 116<br />2: PgSelectRows[70]<br />ᐳ: First[69], PgSelectSingle[71]"):::bucket
    Bucket14("Bucket 14 (nullableBoundary)<br />Deps: 59, 118, 100<br /><br />ROOT PgSelectSingle{10}ᐸpostᐳ[59]<br />1: <br />ᐳ: 97, 119, 120<br />2: PgSelectRows[78]<br />ᐳ: First[77], PgSelectSingle[79]"):::bucket
    Bucket15("Bucket 15 (nullableBoundary)<br />Deps: 61, 126, 100<br /><br />ROOT PgSelectSingle{11}ᐸpostᐳ[61]<br />1: <br />ᐳ: 98, 127, 128<br />2: PgSelectRows[86]<br />ᐳ: First[85], PgSelectSingle[87]"):::bucket
    Bucket16("Bucket 16 (nullableBoundary)<br />Deps: 63, 122, 100<br /><br />ROOT PgSelectSingle{12}ᐸpostᐳ[63]<br />1: <br />ᐳ: 99, 123, 124<br />2: PgSelectRows[94]<br />ᐳ: First[93], PgSelectSingle[95]"):::bucket
    Bucket17("Bucket 17 (nullableBoundary)<br />Deps: 71, 100<br /><br />ROOT PgSelectSingle{13}ᐸpersonᐳ[71]"):::bucket
    Bucket18("Bucket 18 (nullableBoundary)<br />Deps: 79, 100<br /><br />ROOT PgSelectSingle{14}ᐸpersonᐳ[79]"):::bucket
    Bucket19("Bucket 19 (nullableBoundary)<br />Deps: 87, 100<br /><br />ROOT PgSelectSingle{15}ᐸpersonᐳ[87]"):::bucket
    Bucket20("Bucket 20 (nullableBoundary)<br />Deps: 95, 100<br /><br />ROOT PgSelectSingle{16}ᐸpersonᐳ[95]"):::bucket
    end
    Bucket0 --> Bucket1 & Bucket2 & Bucket3 & Bucket4
    Bucket1 --> Bucket9
    Bucket2 --> Bucket10
    Bucket3 --> Bucket11
    Bucket4 --> Bucket12
    Bucket9 --> Bucket13
    Bucket10 --> Bucket14
    Bucket11 --> Bucket15
    Bucket12 --> Bucket16
    Bucket13 --> Bucket17
    Bucket14 --> Bucket18
    Bucket15 --> Bucket19
    Bucket16 --> Bucket20

    %% plan dependencies
    PgSelect11[["PgSelect[11∈0] ➊<br />ᐸpostᐳ"]]:::plan
    Object14{{"Object[14∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    ApplyInput16{{"ApplyInput[16∈0] ➊"}}:::plan
    PgSelectInlineApply113["PgSelectInlineApply[113∈0] ➊"]:::plan
    Object14 & ApplyInput16 & PgSelectInlineApply113 --> PgSelect11
    PgSelect22[["PgSelect[22∈0] ➊<br />ᐸpostᐳ"]]:::plan
    ApplyInput25{{"ApplyInput[25∈0] ➊"}}:::plan
    PgSelectInlineApply117["PgSelectInlineApply[117∈0] ➊"]:::plan
    Object14 & ApplyInput25 & PgSelectInlineApply117 --> PgSelect22
    PgSelect30[["PgSelect[30∈0] ➊<br />ᐸpostᐳ"]]:::plan
    ApplyInput33{{"ApplyInput[33∈0] ➊"}}:::plan
    PgSelectInlineApply125["PgSelectInlineApply[125∈0] ➊"]:::plan
    Object14 & ApplyInput33 & PgSelectInlineApply125 --> PgSelect30
    PgSelect39[["PgSelect[39∈0] ➊<br />ᐸpostᐳ"]]:::plan
    ApplyInput42{{"ApplyInput[42∈0] ➊"}}:::plan
    PgSelectInlineApply121["PgSelectInlineApply[121∈0] ➊"]:::plan
    Object14 & ApplyInput42 & PgSelectInlineApply121 --> PgSelect39
    __InputObject7{{"__InputObject[7∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[6]"}}:::plan
    Access8{{"Access[8∈0] ➊<br />ᐸ0.undefinedᐳ"}}:::plan
    Access8 --> __InputObject7
    Access12{{"Access[12∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access13{{"Access[13∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access12 & Access13 --> Object14
    __InputObject18{{"__InputObject[18∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[6]"}}:::plan
    Access19{{"Access[19∈0] ➊<br />ᐸ0.aliceᐳ"}}:::plan
    Access19 --> __InputObject18
    __InputObject27{{"__InputObject[27∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[6]<br />- Constantᐸnullᐳ[28]"}}:::plan
    __InputObject35{{"__InputObject[35∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[6]"}}:::plan
    Access36{{"Access[36∈0] ➊<br />ᐸ0.post3ᐳ"}}:::plan
    Access36 --> __InputObject35
    __Value0["__Value[0∈0] ➊<br />ᐸvariableValuesᐳ"]:::plan
    __Value0 --> Access8
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access12
    __Value2 --> Access13
    Connection15[["Connection[15∈0] ➊<br />ᐸ11ᐳ"]]:::plan
    PgSelect11 --> Connection15
    __InputObject7 --> ApplyInput16
    __Value0 --> Access19
    Connection24[["Connection[24∈0] ➊<br />ᐸ22ᐳ"]]:::plan
    PgSelect22 --> Connection24
    __InputObject18 --> ApplyInput25
    Connection32[["Connection[32∈0] ➊<br />ᐸ30ᐳ"]]:::plan
    PgSelect30 --> Connection32
    __InputObject27 --> ApplyInput33
    __Value0 --> Access36
    Connection41[["Connection[41∈0] ➊<br />ᐸ39ᐳ"]]:::plan
    PgSelect39 --> Connection41
    __InputObject35 --> ApplyInput42
    ConnectionItems44[["ConnectionItems[44∈0] ➊"]]:::plan
    Connection15 --> ConnectionItems44
    ConnectionItems47[["ConnectionItems[47∈0] ➊"]]:::plan
    Connection24 --> ConnectionItems47
    ConnectionItems50[["ConnectionItems[50∈0] ➊"]]:::plan
    Connection32 --> ConnectionItems50
    ConnectionItems53[["ConnectionItems[53∈0] ➊"]]:::plan
    Connection41 --> ConnectionItems53
    Access114{{"Access[114∈0] ➊<br />ᐸ11.m.joinDetailsFor65ᐳ"}}:::plan
    PgSelect11 --> Access114
    Access118{{"Access[118∈0] ➊<br />ᐸ22.m.joinDetailsFor73ᐳ"}}:::plan
    PgSelect22 --> Access118
    Access122{{"Access[122∈0] ➊<br />ᐸ39.m.joinDetailsFor89ᐳ"}}:::plan
    PgSelect39 --> Access122
    Access126{{"Access[126∈0] ➊<br />ᐸ30.m.joinDetailsFor81ᐳ"}}:::plan
    PgSelect30 --> Access126
    __Item56[/"__Item[56∈9]<br />ᐸ44ᐳ"\]:::itemplan
    ConnectionItems44 ==> __Item56
    PgSelectSingle57{{"PgSelectSingle[57∈9]<br />ᐸpostᐳ"}}:::plan
    __Item56 --> PgSelectSingle57
    __Item58[/"__Item[58∈10]<br />ᐸ47ᐳ"\]:::itemplan
    ConnectionItems47 ==> __Item58
    PgSelectSingle59{{"PgSelectSingle[59∈10]<br />ᐸpostᐳ"}}:::plan
    __Item58 --> PgSelectSingle59
    __Item60[/"__Item[60∈11]<br />ᐸ50ᐳ"\]:::itemplan
    ConnectionItems50 ==> __Item60
    PgSelectSingle61{{"PgSelectSingle[61∈11]<br />ᐸpostᐳ"}}:::plan
    __Item60 --> PgSelectSingle61
    __Item62[/"__Item[62∈12]<br />ᐸ53ᐳ"\]:::itemplan
    ConnectionItems53 ==> __Item62
    PgSelectSingle63{{"PgSelectSingle[63∈12]<br />ᐸpostᐳ"}}:::plan
    __Item62 --> PgSelectSingle63
    List115{{"List[115∈13]<br />ᐸ114,57ᐳ"}}:::plan
    Access114 & PgSelectSingle57 --> List115
    First69{{"First[69∈13]"}}:::plan
    PgSelectRows70[["PgSelectRows[70∈13]"]]:::plan
    PgSelectRows70 --> First69
    Lambda116{{"Lambda[116∈13]<br />ᐸpgInlineViaJoinTransformᐳ"}}:::plan
    Lambda116 --> PgSelectRows70
    PgSelectSingle71{{"PgSelectSingle[71∈13]<br />ᐸpersonᐳ"}}:::plan
    First69 --> PgSelectSingle71
    PgClassExpression96{{"PgClassExpression[96∈13]<br />ᐸ__post__.”body”ᐳ"}}:::plan
    PgSelectSingle57 --> PgClassExpression96
    List115 --> Lambda116
    List119{{"List[119∈14]<br />ᐸ118,59ᐳ"}}:::plan
    Access118 & PgSelectSingle59 --> List119
    First77{{"First[77∈14]"}}:::plan
    PgSelectRows78[["PgSelectRows[78∈14]"]]:::plan
    PgSelectRows78 --> First77
    Lambda120{{"Lambda[120∈14]<br />ᐸpgInlineViaJoinTransformᐳ"}}:::plan
    Lambda120 --> PgSelectRows78
    PgSelectSingle79{{"PgSelectSingle[79∈14]<br />ᐸpersonᐳ"}}:::plan
    First77 --> PgSelectSingle79
    PgClassExpression97{{"PgClassExpression[97∈14]<br />ᐸ__post__.”body”ᐳ"}}:::plan
    PgSelectSingle59 --> PgClassExpression97
    List119 --> Lambda120
    List127{{"List[127∈15]<br />ᐸ126,61ᐳ"}}:::plan
    Access126 & PgSelectSingle61 --> List127
    First85{{"First[85∈15]"}}:::plan
    PgSelectRows86[["PgSelectRows[86∈15]"]]:::plan
    PgSelectRows86 --> First85
    Lambda128{{"Lambda[128∈15]<br />ᐸpgInlineViaJoinTransformᐳ"}}:::plan
    Lambda128 --> PgSelectRows86
    PgSelectSingle87{{"PgSelectSingle[87∈15]<br />ᐸpersonᐳ"}}:::plan
    First85 --> PgSelectSingle87
    PgClassExpression98{{"PgClassExpression[98∈15]<br />ᐸ__post__.”body”ᐳ"}}:::plan
    PgSelectSingle61 --> PgClassExpression98
    List127 --> Lambda128
    List123{{"List[123∈16]<br />ᐸ122,63ᐳ"}}:::plan
    Access122 & PgSelectSingle63 --> List123
    First93{{"First[93∈16]"}}:::plan
    PgSelectRows94[["PgSelectRows[94∈16]"]]:::plan
    PgSelectRows94 --> First93
    Lambda124{{"Lambda[124∈16]<br />ᐸpgInlineViaJoinTransformᐳ"}}:::plan
    Lambda124 --> PgSelectRows94
    PgSelectSingle95{{"PgSelectSingle[95∈16]<br />ᐸpersonᐳ"}}:::plan
    First93 --> PgSelectSingle95
    PgClassExpression99{{"PgClassExpression[99∈16]<br />ᐸ__post__.”body”ᐳ"}}:::plan
    PgSelectSingle63 --> PgClassExpression99
    List123 --> Lambda124
    List102{{"List[102∈17]<br />ᐸ100,101ᐳ<br />More deps:<br />- Constantᐸ'people'ᐳ[100]"}}:::plan
    PgClassExpression101{{"PgClassExpression[101∈17]<br />ᐸ__person__.”id”ᐳ"}}:::plan
    PgClassExpression101 --> List102
    PgSelectSingle71 --> PgClassExpression101
    Lambda103{{"Lambda[103∈17]<br />ᐸpipeStringEncodeᐳ"}}:::plan
    List102 --> Lambda103
    List105{{"List[105∈18]<br />ᐸ100,104ᐳ<br />More deps:<br />- Constantᐸ'people'ᐳ[100]"}}:::plan
    PgClassExpression104{{"PgClassExpression[104∈18]<br />ᐸ__person__.”id”ᐳ"}}:::plan
    PgClassExpression104 --> List105
    PgSelectSingle79 --> PgClassExpression104
    Lambda106{{"Lambda[106∈18]<br />ᐸpipeStringEncodeᐳ"}}:::plan
    List105 --> Lambda106
    List108{{"List[108∈19]<br />ᐸ100,107ᐳ<br />More deps:<br />- Constantᐸ'people'ᐳ[100]"}}:::plan
    PgClassExpression107{{"PgClassExpression[107∈19]<br />ᐸ__person__.”id”ᐳ"}}:::plan
    PgClassExpression107 --> List108
    PgSelectSingle87 --> PgClassExpression107
    Lambda109{{"Lambda[109∈19]<br />ᐸpipeStringEncodeᐳ"}}:::plan
    List108 --> Lambda109
    List111{{"List[111∈20]<br />ᐸ100,110ᐳ<br />More deps:<br />- Constantᐸ'people'ᐳ[100]"}}:::plan
    PgClassExpression110{{"PgClassExpression[110∈20]<br />ᐸ__person__.”id”ᐳ"}}:::plan
    PgClassExpression110 --> List111
    PgSelectSingle95 --> PgClassExpression110
    Lambda112{{"Lambda[112∈20]<br />ᐸpipeStringEncodeᐳ"}}:::plan
    List111 --> Lambda112

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value0,__Value2,__InputObject7,Access8,PgSelect11,Access12,Access13,Object14,Connection15,ApplyInput16,__InputObject18,Access19,PgSelect22,Connection24,ApplyInput25,__InputObject27,PgSelect30,Connection32,ApplyInput33,__InputObject35,Access36,PgSelect39,Connection41,ApplyInput42,ConnectionItems44,ConnectionItems47,ConnectionItems50,ConnectionItems53,PgSelectInlineApply113,Access114,PgSelectInlineApply117,Access118,PgSelectInlineApply121,Access122,PgSelectInlineApply125,Access126 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3 bucket3
    classDef bucket4 stroke:#0000ff
    class Bucket4 bucket4
    classDef bucket9 stroke:#ff0000
    class Bucket9,__Item56,PgSelectSingle57 bucket9
    classDef bucket10 stroke:#ffff00
    class Bucket10,__Item58,PgSelectSingle59 bucket10
    classDef bucket11 stroke:#00ffff
    class Bucket11,__Item60,PgSelectSingle61 bucket11
    classDef bucket12 stroke:#4169e1
    class Bucket12,__Item62,PgSelectSingle63 bucket12
    classDef bucket13 stroke:#3cb371
    class Bucket13,First69,PgSelectRows70,PgSelectSingle71,PgClassExpression96,List115,Lambda116 bucket13
    classDef bucket14 stroke:#a52a2a
    class Bucket14,First77,PgSelectRows78,PgSelectSingle79,PgClassExpression97,List119,Lambda120 bucket14
    classDef bucket15 stroke:#ff00ff
    class Bucket15,First85,PgSelectRows86,PgSelectSingle87,PgClassExpression98,List127,Lambda128 bucket15
    classDef bucket16 stroke:#f5deb3
    class Bucket16,First93,PgSelectRows94,PgSelectSingle95,PgClassExpression99,List123,Lambda124 bucket16
    classDef bucket17 stroke:#696969
    class Bucket17,PgClassExpression101,List102,Lambda103 bucket17
    classDef bucket18 stroke:#00bfff
    class Bucket18,PgClassExpression104,List105,Lambda106 bucket18
    classDef bucket19 stroke:#7f007f
    class Bucket19,PgClassExpression107,List108,Lambda109 bucket19
    classDef bucket20 stroke:#ffa500
    class Bucket20,PgClassExpression110,List111,Lambda112 bucket20

